<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
<!--	1-100之间能被3整除的数字，存到数组中，计算有多少个-->	
    <body>
    	<script>
    		var arr = []; 
    		var num = 1;
    		var k = 1;
    		while(num <= 100){  
    			if(num%3 == 0){
    		        arr.push(num);
    		        k++;
    		   }
    		    num++;
    		    document.write(num+"\t\t")
    		}
    		
    	    alert("1-100之间能被3整除的数字有"+k+"个"); 
        </script>
	</body>
</html>
